/*
 脚本功能：商店
 */

var a = 0;
var icon = "#fUI/UIWindow/Quest/icon2/7#";
var ttt = "#fUI/UIWindow/Quest/icon2/7#";//"+ttt+"//美化1
var jzs2 = "#fUI/GuildMark.img/Mark/Animal/00002002/15#";//家族小兔子
var xxx = "#fEffect/CharacterEff/1082565/2/0#"; //星系
var ob1 = "#fEffect/SetEff/102/effect/7#";//PPMS鸟右
var ob2 = "#fEffect/SetEff/102/effect/7#";//PPMS鸟左
var F114 = "#fUI/NameTag.img/157/w#";//小兔子戒指头部、
var ob14 = "#fUI/UIWindow2.img/Item/timeLimit/0#";//小闹钟
var ob8 = "#fUI/UIWindow2.img/AdditionalOptionTooltip/epic#";//小紫色按钮a
var ob9 = "#fUI/UIWindow2.img/AdditionalOptionTooltip/rare#";//小紫色按钮b
var ob10 = "#fUI/UIWindow2.img/AdditionalOptionTooltip/unique#";//小紫色按钮s
var ob11 = "#fUI/UIWindow2.img/AdditionalOptionTooltip/legendary#";//小紫色按钮ss
var m1 = "#fUI/NameTag.img/157/w#";//小兔子戒指头部、
var 邪恶卷轴 = "#fEffect/OnUserEff.img/JP_zipang/darkyo/8";//
var 天使 = "#fEffect/SetItemInfoEff.img/466/5";//
var se1= "#fEffect/ItemEff.img/1004532/effect/prone/3#";//
var se2= "#fEffect/ItemEff.img/1004532/effect/walk1/3#";//
var se3= "#fEffect/ItemEff.img/1004532/effect/prone/0#";//
var se4= "#fEffect/ItemEff.img/1004532/effect/alert/0#";//
var mmm1= "#fEffect/ItemEff.img/1102830/effect/default/0#";//
var mmm2 = "#fEffect/ItemEff.img/1102583/effect/swingO1/5#";//
var mmm3= "#fEffect/ItemEff.img/1102583/effect/stabO1/2#";//
var qst1 = "#fEffect/ItemEff.img/1004532/effect/walk1/3#";//
var qst2 = "#fEffect/ItemEff.img/1004475/effect/default/1#";//
var qst3 = "#fEffect/ItemEff.img/1004435/effect/default/0#";//
var qst4 = "#fEffect/ItemEff.img/1004436/effect/default/5#";//
var qst5 = "#fUI/MultiYutGame.img/MultiYutGame/pocket#";//
function start() {
    a = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (mode == -1) {
        cm.dispose();
    } else {
        if (mode == 1)
            a++;
        else
            a--;
        if (a == -1) {
            cm.dispose();
        } else if (a == 0) {
            cm.sendSimple("#r#e  " + cm.getServerName()+ "积分商城\r\n  ps:#n#r不花钱也能变帅，不花钱也要吃鸡，老司机请打卡上车\r\n  您的时间非常值钱，快去做PPMS特色副本赚取各类积分！"+"#b#n\r\n#L0# "+qst5+"#b#e稀有翅膀兑换处 — #r采用PPMS微积分兑换.#l \r\n\r\n#L1# "+qst5+"#e#b伤害皮肤兑换处 - #r采用PK热力值兑换.\r\n\r\n#L2# "+qst5+"#e#b稀有材料兑换处 - #r采用村落贡献兑换.\r\n\r\n#L5# "+qst5+"#e#b特效图腾兑换处 - #r采用PPMS活跃度兑换.#l")
        } else if (a == 1) {
            if (selection == 0){
			    cm.dispose();
                cm.openNpc(9400176, "微积分翅膀商城");//万能商店
            }else if (selection == 1) {//防具商店
			    cm.dispose();
                cm.openNpc(9400176, "pk热力伤害皮肤");//点卷
		    }else if (selection == 2) {//
			    cm.dispose();
                cm.openNpc(9400176, "村落材料");//抵用
		    }else if (selection == 3) {//微积分
			    cm.dispose();
                cm.openNpc(9400176, "免费积分商店列表");//
		    }else if (selection == 4) {//pk热力值
			    cm.dispose();
                cm.openNpc(9400176, "pk热力伤害皮肤");//
				}else if (selection == 5) {//pk热力值
			    cm.dispose();
                cm.openNpc(9400176, "特效图腾商店");//
            } else {
                // 1012123 杂货商店 x
                //10 低级防具
                //11 50~60级防具
                //12 60~70级防具
                //20 低级武器
                //21 50~60级武器
                //22 60~70级武器
                // 3 其他道具 
                // 4 卷轴商店 x 
                // 1012125 宠物商店
                // 6 辅助武器
                cm.openShop(selection);
                cm.dispose();
            }
        } else if (a == 2) {
            switch (selection) {
                case 0://低级防具
                    //cm.openShop(10)
                    cm.sendOk("暂时未开放。")
                    break;
                case 1://50~60级防具
                    cm.openShop(11)
                    break;
                case 2://60~70级防具
                    cm.openShop(12)
                    break;
                case 3://低级武器
                    //cm.openShop(20)
                    cm.sendOk("暂时未开放。")
                    break;
                case 4://50~60级武器
                    cm.openShop(21)
                    break;
                case 5://60~70级武器
                    cm.openShop(22)
                    break;
            }
            cm.dispose();
        }//a
    }//mode
}//f